<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06_DOM操作</title>
</head>
<body>
<button onclick="addMoney()">点我变富有</button>
<hr>
<!--<img src="img/money.jpg" width="200px">-->
<script>
    function addMoney(){
       let imgE = document.createElement('img');//<img>
       imgE.src = 'img/money.jpg';//<img src=""></img>
       imgE.width = 200;//<img src="" width=""></img>
       let bodyE = document.querySelector('body')//找到body元素
        bodyE.appendChild(imgE);//把imgE元素追加到body元素后面
    }
</script>
</body>
</html>